enum Color {
    heart = "♥",
    spade = "♠",
    club = "♣",
    diamond = "♦"
}

enum Mark {
    A = "A",
    two = "2",
    three = "3",
    four = "4",
    five = "5",
    six = "6",
    seven = "7",
    eight = "8",
    nine = "9",
    ten = "10",
    eleven = "J",
    twelve = "Q",
    king = "K"
}
console.log(Mark);

type Jokers = Joker[];

type Joker = {
    color:Color
    mark:Mark
}
//创建扑克牌
function createJokers():Jokers {
    // 创建数组
      const jokers:Jokers = [];
      //获取到枚举对象的值数组;
      const marks = Object.values(Mark)
      const colors = Object.values(Color)
      for (const m of marks) {
        for (const c of colors) {
            jokers.push({
                color:c,
                mark:m
            })
        }
      }
      return jokers;
    }
    function printJokers(jokers:Jokers) {
        jokers.forEach((i)=>{
            console.log(i.color + i.mark);
            
        })
    }
    const cards = createJokers();
    console.log(cards);
    
printJokers(cards);